From 82b410ae89c3a8a378b4a4328904571bc00ada53 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Wed, 15 Oct 2003 16:13:10 +0000 Subject: [PATCH] Fixed crash in mingw build when writing to Cetus format from a GPX file that contained a creation date before 1970; bmgpx creates such GPX files. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@519 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/cetus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gpsbabel/cetus.c b/gpsbabel/cetus.c index ac48612ba..4368bb73e 100644 --- a/gpsbabel/cetus.c +++ b/gpsbabel/cetus.c @@ -205,8 +205,7 @@ cetus_writewpt(waypoint *wpt) rec = xcalloc(sizeof(*rec)+1018,1); - if (wpt->creation_time) { - tm = gmtime(&wpt->creation_time); + if (wpt->creation_time && (NULL != (tm = gmtime(&wpt->creation_time)))){ rec->min = tm->tm_min; rec->hour = tm->tm_hour; rec->sec = tm->tm_sec; -- 2.30.2